package com.function;

import java.util.function.Function;

public class FunctionDemo {


    public static void main(String[] args) {
        String s = "17";
        int ageNum = getAgeNum(s, t -> Integer.parseInt(t), t -> t += 10, t -> t += 10);
        System.out.println(ageNum);
    }

    public static int getAgeNum(String age,Function<String, Integer> t1, Function<Integer, Integer> t2, Function<Integer, Integer> t3) {
        return t1.andThen(t2).andThen(t3).apply(age);
    }
}
